﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StructTool
{
    class Program
    {
        static void Main(string[] args)
        {
            const string filePath = "d:\\12.cos";
            var fs = File.Create(filePath);
            //fs.Seek(0, SeekOrigin.Begin);
            var uInt64MaxString = UInt64.MaxValue.ToString(CultureInfo.InvariantCulture);
            const string infoZipLength = "12121300";
            const string videoLength = "12160100";
            //const string handoutLength = ""
            var maxLength = uInt64MaxString.Length;
            var sb = new StringBuilder(maxLength);
            var bw = new BinaryWriter(fs);
            for (var i = 0; i < maxLength - infoZipLength.Length; i++)
            {
                sb.Append("0");
            }
            sb.Append(infoZipLength);
            var bf = Encoding.ASCII.GetBytes(sb.ToString());
            foreach (var b in bf)
            {
                bw.Write(b);
                bw.Flush();
            }
            bw.Close();
            fs.Close();
           
            Console.ReadLine();
        }
    }
}
